﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class Level5ButtonHeartButton : MonoBehaviour
{
    public Button btn;
    public Image btnImage;
    public int btnIndex;
    private Level5ButtonHeart btnLevel;

    public void Init(int index, Level5ButtonHeart level)
    {
        btnLevel = level;
        btnIndex = index;
    }


    public void ActiveBtn(bool act)
    {
        btnImage.color = act ? Color.red : Color.white;
    }

    void Start()
    {
        btn.onClick.AddListener(() =>
        {
            SoundManager.Instance.PlayAudio(SoundType.Click.ToString(), false);
            btnLevel.BtnEvent(this);
        });
    }

  
}
